package com.mingmen.canting.httpconfig;

import com.mingmen.canting.http.MyOkhttp;
import com.mingmen.canting.http.callback.StringCallback;
import com.mingmen.canting.http.callback.StringNoCallback;
import com.mingmen.canting.http.callback.StringNoDialogCallback;

import java.io.File;
import java.util.List;

import okhttp3.Call;
import okhttp3.Response;

public class HttpResponse {

    public static void getCode(String phone, String t, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.getCode)
                .params("phone", phone)
                .params("t", t)
                .execute(callback);

    }

    public static void getRegister(String phone, String pwd, String verifyCode, String companyId, String departmentId, String position, String t, String userName, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.REGISTER)
                .params("phone", phone)
                .params("pwd", pwd)
                .params("verifyCode", verifyCode)
                .params("companyId", companyId)
                .params("departmentId", departmentId)
                .params("position", position)
                .params("t", t)
                .params("userName", userName)
                .execute(callback);

    }

    public static void getLogin(String phone, String pwd, String t, String Apptype, String CompanyId, StringCallback callback) {
//        CompanyId 没有传0
        MyOkhttp.post(AppConfig.Url + AppConfig.LOGIN)
                .params("phone", phone)
                .params("pwd", pwd)
                .params("t", t)
                .params("appType", Apptype)
                .params("companyId", CompanyId)
                .execute(callback);

    }
    public static void quit(String token, StringCallback callback) {
//        CompanyId 没有传0
        MyOkhttp.post(AppConfig.Url + AppConfig.QUIT)
                .params("token", token)

                .execute(callback);

    }
    public static void Forget(String token, String phone, String verifyCode, String originalPassword, String newPassword, String t, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.FORGET)
                .params("token", token)
                .params("phone", phone)
                .params("verifyCode", verifyCode)
                .params("originalPassword", originalPassword)
                .params("newPassword", newPassword)
                .params("t", t)
                .execute(callback);

    }

    public static void getRestruant(StringNoCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.RESTRUANT)

                .execute(callback);

    }

    public static void getZhiwei(StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + "restaurant/base/getPosition")
//        MyOkhttp.post("http://192.168.3.18:8801/restaurant/base/getPosition")
                .execute(callback);

    }

    public static void daiShenhe(String token, String st, String startTime, String endTime, String flag, int pageNumber, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.DAISHENHE)
                .params("token", token)
                .params("st", st)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .params("flag", flag)
                .params("pageNumber", pageNumber)

                .execute(callback);
    }

    //     获取商品分类列表
    public static void getShop(String token, String categoryId, String flag, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.SHOPFENLEI)
                .params("token", token)
                .params("categoryId", categoryId)
                .params("flag", flag)
                .execute(callback);
    }


    //    【获取分类下商品】
    public static void getFenLeiShop(String token, String categoryId, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.SHOPFENLEI_LIST)
                .params("token", token)
                .params("categoryId", categoryId)

                .execute(callback);
    }

    //    【获取收藏/常用商品】{action}= getQuickCommodityList
    public static void getQuickCommodityList(String token, String mode, String flag, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.GETQUICKCOMMODITYLIST)
                .params("token", token)
                .params("mode", mode)
                .params("flag", flag)
                .execute(callback);
    }


    //删除订单
    public static void deleteItem(String token, String applyId, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.DELETE_ITEM)
                .params("token", token)
                .params("applyId", applyId)

                .execute(callback);
    }

    //追加订单
    public static void getItem(String token, String applyId, String commodityId, String amount, String role, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.DELETE_ITEM)
                .params("token", token)
                .params("applyId", applyId)
                .params("commodityId", commodityId)
                .params("amount", amount)
                .params("role", role)
                .execute(callback);
    }

    //    NEW_PRICE 参照历史申请单生成新申请单
    public static void addNewPrice(String token, String applyId, String arrivalDate, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.NEW_PRICE)
                .params("token", token)
                .params("applyId", applyId)
                .params("arrivalDate", arrivalDate)
                .execute(callback);
    }

    //    【根据申请单显示商品清单】
    public static void showShopDetail(String token, String applyId, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.SHOW_SHOPDETAIL)
                .params("token", token)
                .params("applyId", applyId)
                .execute(callback);
    }

    //【获取被驳回的申请单数量】
    public static void getBohuiCount(String token, String startTime, String endTime, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.GETCOUNT)
                .params("token", token)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .execute(callback);
    }

    //    为商品添加备注
    public static void getRemark(String token, String commodityId, String mark, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.REMARK)
                .params("token", token)
                .params("commodityId", commodityId)
                .params("mark", mark)
                .execute(callback);
    }

    //    修改商品数量
    public static void getModify(String token, String applyId, String role, String modiData, String deleteData, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.NEWMODIFY_NUMBER)
                .params("token", token)
                .params("applyId", applyId)
                .params("role", role)
                .params("modiData", modiData)
                .params("deleteData", deleteData)
                .execute(callback);
    }

    //    商品提交
    public static void submitData(String token, String limitDate, String flag, String jdata, String timeSpan, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.ADDAPPLYBILL)
                .params("token", token)
                .params("limitDate", limitDate)
                .params("flag", flag)
                .params("jdata", jdata)
                .params("timeSpan", timeSpan)
                .execute(callback);

    }

    //    采购单按状态列表
    public static void getConsumeBillList(String token, String st, String startTime, String endTime, int pageNumber, String commodityId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CONSUMEBILLLIST)
                .params("token", token)
                .params("st", st)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .params("pageNumber", pageNumber)
                .params("commodityId", commodityId)
                .execute(callback);

    }

    //    驳回商品列表
    public static void getBohuiList(String token, String applyId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.BOHUILIST)
                .params("token", token)
                .params("applyId", applyId)
                .execute(callback);

    }

    //    获取仓库列表

    public static void getCangKuList(String token, String flag, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CANGKULIST)
                .params("token", token)
                .params("flag", flag)
                .execute(callback);

    }

    // 【领取出库】
    public static void getChukuSubmit(String token, String applyId, String jdata, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CHUKUSUBMIT)
                .params("token", token)
                .params("applyId", applyId)
                .params("jdata", jdata)

                .execute(callback);

    }

    // 【商品比价】
    public static void getComparePrice(String token, String startTime, String endTime, String commodityId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.COMPARE_PRICE)
                .params("token", token)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .params("commodityId", commodityId)
                .execute(callback);

    }

    // 【获取所有商品列表】
    public static void getComparePriceList(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETALL_SHOPLIST)
                .params("token", token)

                .execute(callback);

    }

    // 【申请单审批】
    public static void getApplyListByOrder(String token, String st, String startTime, String endTime, String flag, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETAPPLYLIST)
                .params("token", token)
                .params("st", st)
                .params("startTime", startTime)
                .params("endTime", endTime)

                .execute(callback);

    }

    // 【申请单审批】
    public static void getApplyListByCategory(String token, String st, String startTime, String endTime, String keyWord, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETAPPLYBYCATEGORY)
                .params("token", token)
                .params("st", st)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .params("keyWord", keyWord)
                .execute(callback);

    }

    public static void setAuditCancel(String token, String flag, String id, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.AUDITCANCEL)
                .params("token", token)
                .params("flag", flag)
                .params("id", id)

                .execute(callback);

    }

    public static void setAuditReject(String token, String jdata, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.AuditReject)
                .params("token", token)
                .params("jdata", jdata)


                .execute(callback);

    }

    public static void setAuditRejectPass(String token, String applyId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.AuditReject)
                .params("token", token)
                .params("applyId", applyId)


                .execute(callback);

    }

    public static void setHeartBeat(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.HEARTBEAT)
                .params("token", token)

                .execute(callback);

    }

    public static void setLock(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.LOCK)
                .params("token", token)

                .execute(callback);

    }

    public static void setUnLock(String token, StringNoCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.UNLOCK)
                .params("token", token)

                .execute(callback);

    }

    public static void setAuditPass(String token, String applyId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.AUDITPASS)
                .params("token", token)
                .params("applyId", applyId)
                .execute(callback);

    }

    public static void getPrePurchaseDate(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.PREPURCHASE)
                .params("token", token)

                .execute(callback);

    }

    public static void getPrePurchaseCount(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.PRECHASECOUNT)
                .params("token", token)

                .execute(callback);

    }

    public static void setCommodityCollect(String token, String commodityId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.COMMODITYQUICK)
                .params("token", token)
                .params("commodityId", commodityId)
                .execute(callback);

    }

    //备注标签
    public static void getMark(String token, String count, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETMARK)
                .params("token", token)
                .params("count", count)
                .execute(callback);
    }

    //按供货商获取购物车中待采购商品
    public static void getShoppingCart(String token, String startTime, String endTime, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SHOPPINGCART)
                .params("token", token)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .execute(callback);
    }

    //新增送货地址
    public static void addAddress(String token, String address, String flag, String linkman, String linkTel, String houseNumber, String supplierId, String gender, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.ADDADDRESS)
                .params("token", token)
                .params("address", address)
                .params("flag", flag)
                .params("linkman", linkman)
                .params("linkTel", linkTel)
                .params("houseNumber", houseNumber)
                .params("supplierId", supplierId)
                .params("gender", gender)
                .execute(callback);
    }


    //采购订单列表
    public static void getAddressList(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.ADDRESSLIST)
                .params("token", token)


                .execute(callback);
    }

    //新增送货地址
    public static void updateAddress(String token, String addressId, String address, String flag, String linkman, String linkTel, String houseNumber, String supplierId, String gender, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.UPDATEADDRESS)
                .params("token", token)
                .params("addressId", addressId)
                .params("address", address)
                .params("flag", flag)
                .params("linkman", linkman)
                .params("linkTel", linkTel)
                .params("houseNumber", houseNumber)
                .params("supplierId", supplierId)
                .params("gender", gender)
                .execute(callback);
    }


    //采购订单列表
    public static void doShoppingCartCancel(String token, String applyDetailId, String cancelReason, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SHOPPINGCARTCANCEL)
                .params("token", token)
                .params("applyDetailId", applyDetailId)
                .params("cancelReason", cancelReason)
                .execute(callback);
    }

    //按产品获取供应商
    public static void getSupplierByCommodity(String token, String detailIds, String commodityIds, String keyword, String limitDate, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERBYCOMMODITY)
                .params("token", token)
                .params("detailIds", detailIds)
                .params("commodityIds", commodityIds)
                .params("keyword", keyword)
                .params("limitDate", limitDate)


                .execute(callback);
    }

    //采购订单列表（按供应商）
    public static void getGongYingOrderBySupplier(String token, String st, String startTime, String endTime, String shipping, String commodityId, int pageNumber, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.ORDERBYSUPPLIER)
                .params("token", token)
                .params("st", st)
                .params("startTime", startTime)
                .params("endTime", endTime)
                .params("shipping", shipping)

                .params("commodityId", commodityId)
                .params("pageNumber", pageNumber)
                .execute(callback);
    }


    //【获取供货商详情】{action}= getSupplierInfo
    public static void getSupplierInfo(String token, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERINFO)
                .params("token", token)
                .params("supplierId", supplierId)

                .execute(callback);
    }

    //【【生成采购订单】{action}= createOrder
    public static void createOrder(String token, String ids, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CREATEORDER)
                .params("token", token)
                .params("ids", ids)

                .execute(callback);
    }

    //【【获取供应商所有商品】{action}= getSupplierCommodit
    public static void getSupplierCommodit(String token, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERCOMMDIT)
                .params("token", token)
                .params("supplierId", supplierId)

                .execute(callback);
    }

    //【举报类别列表】{action}= getReportTypeList
    public static void getReportTypeList(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.REPORTTYPELIST)
                .params("token", token)

                .execute(callback);
    }

    //【举报类别列表】{action}= getReportTypeList
    public static void setSupplierAccusation(String token, String supplierId, String photos, String report, String reportKind, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERACCUSATION)
                .params("token", token)
                .params("supplierId", supplierId)
                .params("photos", photos)
                .params("report", report)
                .params("reportKind", reportKind)

                .execute(callback);
    }

    //【举报类别列表】{action}= getReportTypeList
    public static void cancelOrder(String token, String cancelReason, String picture, String billDetailIds, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CANCELORDER)
                .params("token", token)
                .params("cancelReason", cancelReason)
                .params("picture", picture)
                .params("billDetailIds", billDetailIds)

                .execute(callback);
    }


    // 【获取商家资质】{action}= getSupplierQualification
    public static void getSupplierQualification(String token, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETSUPPLIERQALIFICATION)
                .params("token", token)
                .params("supplierId", supplierId)
                .execute(callback);
    }

    // 【获取订单详情】{action}= getOrderInfo
    public static void getOrderInfo(String token, String billId, String partCancelFlag, String partArriveFlag, String partRefuseFlag, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETORDERINFO)
                .params("token", token)
                .params("billId", billId)
                .params("partCancelFlag", partCancelFlag)
                .params("partArriveFlag", partArriveFlag)
                .params("partRefuseFlag", partRefuseFlag)

                .execute(callback);
    }

    // 【供货确认】{action}= setConfirmSupply
    public static void setConfirmSupply(String token, String jdata, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CONFIRMSUPPLY)
                .params("token", token)
                .params("jdata", jdata)
                .execute(callback);
    }

    //  【更换供应商】{action}= changeSupplier
    public static void changeSupplier(String token, String detailIds, String commodityIds, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CHANGESUPPLIER)
                .params("token", token)
                .params("detailIds", detailIds)
                .params("commodityIds", commodityIds)
                .params("supplierId", supplierId)
                .execute(callback);
    }

    //  【退货】{action}= cancelOrder
    public static void cancelOrderAll(String token, String billId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CANCELORDERALL)
                .params("token", token)
                .params("billId", billId)

                .execute(callback);
    }

    //  【更换供应商】{action}= changeSupplier
    public static void listCancelReason(String token, String count, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CANCELREASON)
                .params("token", token)
                .params("count", count)

                .execute(callback);
    }

    //  【按订单获取详细列表，用于重新选择供应商】listOrderDetail
    public static void listOrderDetail(String token, String billId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.ORDERDETAIL)
                .params("token", token)
                .params("billId", billId)

                .execute(callback);
    }

    //  【根据采购单详细Id返回商品】{action}=getCommodityByBillDetailId
    public static void getCommodityByBillDetailId(String token, String billDetailIds, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETCOMMODITYDETAILID)
                .params("token", token)
                .params("billDetailIds", billDetailIds)

                .execute(callback);
    }

    //  【根据采购单详细Id返回商品】{action}=getCommodityByBillDetailId
    public static void changeSupplierNewOrder(String token, String cancelReason, String picture, String supplierId, String billDetailIds, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.CHANGESUPPLIERNEWORDER)
                .params("token", token)
                .params("cancelReason", cancelReason)
                .params("picture", picture)
                .params("supplierId", supplierId)
                .params("billDetailIds", billDetailIds)

                .execute(callback);
    }

    // 【评价/追评】{action}=setEvaluation
    public static void setEvaluation(String token, String billId, String grade, String mark, String picture, String anonymousFlag, String qualityScore, String packageScore, String serviceScore, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SETEVALUATION)
                .params("token", token)
                .params("billId", billId)
                .params("grade", grade)
                .params("mark", mark)
                .params("picture", picture)
                .params("anonymousFlag", anonymousFlag)
                .params("picture", picture)
                .params("qualityScore", qualityScore)
                .params("packageScore", packageScore)
                .params("serviceScore", serviceScore)

                .execute(callback);
    }

    // 【供应商类别列表】{action}= getSupplierCategory
    public static void getSupplierCategory(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERCATEGORY)
                .params("token", token)


                .execute(callback);
    }

    // 【供应商类别列表】{action}= getSupplierCategory
    public static void getSupplierByCategory(String token, String categoryId, String keyword, int pageNumber, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERBYCATEGORY)
                .params("token", token)
                .params("categoryId", categoryId)
                .params("keyword", keyword)
                .params("pageNumber", pageNumber)
                .execute(callback);
    }

    // 【获取供应商详情】{action}= getSupplier
    public static void getSupplier(String token, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETSUPPLIER)
                .params("token", token)
                .params("supplierId", supplierId)
                .execute(callback);
    }


    // 【获取供应商商品】{action}= getSupplierCommodity
    public static void getSupplierCommodity(String token, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERCOMMODITY)
                .params("token", token)
                .params("supplierId", supplierId)
                .execute(callback);
    }

    // 【获取供应商评价】{action}= getSupplierEvaluate
    public static void getSupplierEvaluate(String token, String supplierId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIEREVALUATE)
                .params("token", token)
                .params("supplierId", supplierId)
                .execute(callback);
    }

    // 【供应商大厅】{action}= getSupplierList
    public static void getSupplierList(String token, String fuzzy, String categoryId, String supplierId, int pageNumber, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SUPPLIERLIST)
                .params("token", token)
                .params("fuzzy", fuzzy)
                .params("categoryId", categoryId)
                .params("supplierId", supplierId)
                .params("pageNumber", pageNumber)
                .execute(callback);
    }

    // 【设置为默认供应商】{action}= setDefaultSupplier
    public static void getSupplierList1(String token, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETSUPPLIERLIST)
                .params("token", token)

                .execute(callback);
    }

    // 【按供应商比价】{action}= comparePrice
    public static void comparePrice(String token, String startDate, String endDate, String commodityId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.COMPAREPRICE)
                .params("token", token)
                .params("startDate", startDate)
                .params("endDate", endDate)
                .params("commodityId", commodityId)
                .execute(callback);
    }

    // 【设置为默认供应商品】{action}= setDefaultCommodity
    public static void setDefaultCommodity(String token, String supplierId, String commodityIds, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.DEFAULTCOMMODITY)
                .params("token", token)
                .params("supplierId", supplierId)
                .params("commodityIds", commodityIds)
                .execute(callback);
    }

    // 【设置为默认供应商】{action}= setDefaultSupplier
    public static void setDefaultSupplier(String token, String supplierIds, StringCallback callback) {
        MyOkhttp.post(AppConfig.Url + AppConfig.SETDEFAULTSUPPLIER)
                .params("token", token)
                .params("supplierIds", supplierIds)

                .execute(callback);
    }

    // 【设置为默认供应商】{action}= setDefaultSupplier
    public static void SETBLACKLIST(String token, String supplierIds, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.SETBLACKLIST)
                .params("token", token)
                .params("supplierIds", supplierIds)
                .execute(callback);
    }

    // 【设置为默认供应商】{action}= setDefaultSupplier
    public static void pictureSend(String token, List<File> myfile, StringCallback callback) {

        MyOkhttp.post(AppConfig.PICTURESEND)
                .params("token", token)

                .addFileParams("file", myfile)
                .execute(callback);
    }


    // 【设置为默认供应商】{action}= setDefaultSupplier
    public static void queryCommodity(String token, String keyword, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.QUERYCOMMODY)
                .params("token", token)
                .params("keyword", keyword)
                .execute(callback);
    }

    // 【设置为默认供应商】{action}= setDefaultSupplier
    public static void comparePriceLine(String token, String startDate, String endDate, String commodityId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.COMPAREPRICELINE)
                .params("token", token)
                .params("startDate", startDate)
                .params("endDate", endDate)
                .params("commodityId", commodityId)

                .execute(callback);
    }

    // 【获取供应商类型】{action} = listSupplierCategory
    public static void listSupplierCategory(StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.LISTSUPPLIERCATEGORY)

                .execute(callback);
    }

    // 【获取供应商类型】{action} = listSupplierCategory
    public static void listSupplierByKeyword(String token, String keyword, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.LISTSUPPLIERBYKEYWORD)
                .params("token", token)
                .params("keyword", keyword)
                .execute(callback);
    }

    // 【餐厅端采购订单生成图片】{action} = restOrderImage
    public static void restOrderImage(String token, String billId, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.RESETORDERIMAGE)
                .params("token", token)
                .params("billId", billId)
                .execute(callback);
    }

    // 【餐厅端采购订单生成图片】{action} = restOrderImage
    public static void getCookLockStatus(String token, String count, StringCallback callback) {

        MyOkhttp.post(AppConfig.Url + AppConfig.GETCOOKLOCKSTATUS)
                .params("token", token)
                .params("count", count)
                .execute(callback);
    }
}
